<!DOCTYPE html>
<!--conf
<sample>
              <product version="4.0b1" edition="std"/>
                     <modifications>
                            <modified date="130911"/>
                     </modifications>
               </sample>
-->
<html>
<head>
	<title>Show / hide items</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<script>
		var myMenu;
		var sel;
		function doOnLoad() {
			sel = document.getElementById("sel");
			myMenu = new dhtmlXMenuObject({
				parent: "menuObj",
				icons_path: "../common/imgs/",
				xml: "../common/dhxmenu.xml",
				onload: function(){
					myMenu.forEachItem(function(itemId){
						if (myMenu.getItemType(itemId) != "separator") sel.options.add(new Option(myMenu.getItemText(itemId), itemId));
					});
				}
			});
		}
		function getId() {
			return sel.options[sel.selectedIndex].value;
		}
		function show() {
			myMenu.showItem(getId());
		}
		function hide() {
			myMenu.hideItem(getId());
		}
		function isHidden() {
			alert(myMenu.isItemHidden(getId()));
		}
	</script>
</head>
<body onload="doOnLoad()">
	<div style="height: 250px;"><div id="menuObj"></div></div>
	<div>
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td>Select Item</td>
				<td width="10">&nbsp;</td>
				<td><select id="sel"></select></td>
				<td width="10">&nbsp;</td>
				<td><input type="button" value="Show" onclick="show();"> <input type="button" value="Hide" onclick="hide();"> <input type="button" value="Is Hidden?" onclick="isHidden();"></td>
			</tr>
		</table>
	</div>
</body>
</html>